Cannot assign to 'current' because it is a read-only property